﻿using UnityEngine;

public class GroundCommonHFSM : PlayerBaseHFSM {
	public GroundCommonHFSM(PlayerController controller, PlayerStateEnum stateName, State<PlayerStateEnum> superFSM, StateFactory<PlayerStateEnum> factory) : base(controller, stateName, superFSM, factory) {
		AddConditionToSelf(() => IsZero(controller.XInput));

		AddNewTransition(PlayerStateEnum.GroundMoveHFSM, () => !IsZero(controller.XInput) && CurState is not PlayerUseItem);
	}

	public override void Enter() {
		base.Enter();
		_controller.Velocity = new Vector2(0, _controller.Velocity.y);
		//Debug.Log("1");
	}

}